package com.shop.user.controller;

import com.shop.entity.dto.WeChatUser.UserLoginDto;
import com.shop.entity.vo.UserLoginVo;
import com.shop.user.service.UserService;
import com.shop.utils.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("login")
    public Result<UserLoginVo> login(@RequestBody UserLoginDto dto){
        return userService.Login(dto);
    }

}
